﻿/*
 * File: Portal.cs
 * Developer : Brent Larsen (brentoboy@gmail.com)
 * Date: 2011-AUG-9
 * Copyright (c) 2011 Brent Larsen.
 * Distributed under the terms of the GPL v3
 *  
 * This file is part of GenX-RPG
 * http://code.google.com/p/genx-rpg/ 
 * 
 * GenX-RPG is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * GenX-RPG is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with GenX-RPG.  If not, see <http://www.gnu.org/licenses/>.
 */


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Rpg
{
    public class Portal : IStep
    {
        public int Id { get; set; }
        public int MapId { get; set; }
        public int X1 { get; set; }
        public int Y1 { get; set; }
        public int X2 { get; set; }
        public int Y2 { get; set; }
        public int To_MapId { get; set; }
        public int To_X1 { get; set; }
        public int To_Y1 { get; set; }
        public int To_X2 { get; set; }
        public int To_Y2 { get; set; }
        public int State { get; set; }

        // I use this when I initialize an existing portal from the database
        public Portal(int id, int mapId, int x1, int y1, int x2, int y2, int to_mapId, int to_x1, int to_y1, int to_x2, int to_y2, int state)
        {
            this.Id = id;
            this.MapId = mapId;
            this.X1 = x1;
            this.Y1 = y1;
            this.X2 = x2;
            this.Y2 = y2;
            this.To_MapId = to_mapId;
            this.To_X1 = to_x1;
            this.To_Y1 = to_y1;
            this.To_X2 = to_x2;
            this.To_Y2 = to_y2;
            this.State = state;
        }

        // I use this to initialize a new portal so I have some basic settings pre-filled for them to edit
        public Portal(int id, int mapId, int x, int y)
        {
            this.Id = id;
            this.MapId = mapId;
            this.X1 = x;
            this.Y1 = y;
            this.X2 = x;
            this.Y2 = y;
            this.To_MapId = 0;
            this.To_X1 = 0;
            this.To_Y1 = 0;
            this.To_X2 = 0;
            this.To_Y2 = 0;
            this.State = 0;
        }
    }
}
